# -*- coding: utf-8 -*-
#  @author  Bink
#  @date  2021/4/6 10:33 上午
#  @Email : 2641032316@qq.com
import tensorflow as tf

with tf.Session() as sess:
    print(sess.run(tf.random_normal([3, 4])))
    print("100个0的一维向量")
    print(sess.run(tf.zeros([100])))
    print("784x100矩阵,每个值[-1,1]之间")
    print(sess.run(tf.random_normal([784, 100], -1, 1)))

matrix1 = tf.constant([[3., 3.]])
print("matrix1", matrix1)
matrix2 = tf.constant([[2.], [2.]])
print("matrix2", matrix2)
product = tf.matmul(matrix1, matrix2)
sess = tf.Session()
result = sess.run(product)
print("result", result)
sess.close()
# 变化：
matrix1 = tf.constant([[3., 3.]])
print("matrix1", matrix1)
matrix2 = tf.constant([[2.], [2.]])
print("matrix2", matrix2)
product = tf.matmul(matrix1, matrix2)
with tf.Session() as sess:
    result = sess.run(product)
    print("result", result)
